<?php

defined('_JEXEC') or die();

jimport('joomla.application.component.model');

class Easiv2adminModelManageInstances extends JModel {
	
	protected $db;
	protected $query;
	
	protected $data;
	  	
	
	function __construct() {
		
		parent::__construct();
		
		$this->db = JFactory::getDBO();
		$this->query = $this->db->getQuery(true);
	}
	
	/**
	 * This method return all rows of the easiv2_instances table for overview in manageInstances view
	 */
	function getInstanceInfo() {
		
		$this->db->setQuery("SELECT * FROM #__easiv2_instances ORDER BY id");

		$this->data = $this->db->loadObjectList();
		
		return $this->data;
	}
}